//
//  BKZSHistoryHeaderView.m
//  baokaodaxue
//
//  Created by liuting on 15/6/14.
//  Copyright (c) 2015年 宏图教育. All rights reserved.
//

#import "BKZSHistoryHeaderView.h"

@implementation BKZSHistoryHeaderView


- (void)awakeFromNib {
    // Initialization code
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)drawRect:(CGRect)rect {
    // Drawing code
    CGContextRef context = UIGraphicsGetCurrentContext();
    
   
    
    CGContextSetLineWidth(context, .8);
    
    CGContextSetRGBStrokeColor(context, .5, .5, .5, .6);
    
    CGContextMoveToPoint(context, 0, 0);
    CGContextAddLineToPoint(context,rect.size.width, 0);
    CGContextAddLineToPoint(context,rect.size.width, rect.size.height);
    CGContextAddLineToPoint(context, 0, rect.size.height);
    CGContextAddLineToPoint(context, 0, 0);
    CGContextStrokePath(context);
    
    CGContextSetLineWidth(context, .5);
    CGContextSetRGBStrokeColor(context, .5, .5, .5, 0.5);
    
    CGFloat first = 57;
    CGFloat height = rect.size.height;
    CGFloat width = rect.size.width;
    CGContextMoveToPoint(context, first, 0);
    CGContextAddLineToPoint(context, first, height);
    CGContextStrokePath(context);

    CGContextMoveToPoint(context, first + 2 + 57, 0);
    CGContextAddLineToPoint(context, first + 2 + 57, height);
    CGContextStrokePath(context);
    
    CGFloat itemWidth = ( rect.size.width - first - 59 ) / 3;
    for (int i = 1; i < 3; i ++) {
        CGContextMoveToPoint(context, first + 59 + itemWidth * i, 0);
        CGContextAddLineToPoint(context, first + 59 + itemWidth * i, height);
        CGContextStrokePath(context);
    }
    
    
}

@end
